/* === ROOT VARIABLES === */
:root {
  --primary-color: #252839;
  --secondary-color: #2b2e3f;
  --border-color: #4b4e5f;
  --text-color1: #fefefe;
  --text-color2: #f6f6f6;
  --shadow: rgba(0, 0, 0, 0.5);
  --online-status: #31cc46;
  --themes: #4b4e5f;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  font-size: clamp(0.8rem, 2vw, 14px);
  text-align: left;
  text-decoration: none;
  color: var(--text-color2);
}

body {
  position: relative;
  width: 90vw;
  max-width: 1150px;
  margin: 0 auto;
  background-color: var(--primary-color);
}

/* General typography */
h1,
h2 {
  font-family: "Montserrat", sans-serif;
  color: var(--text-color1);
}
h1 {
  font-size: clamp(2rem, 5vw, 2.5rem);
}
h2 {
  font-size: clamp(0.9rem, 3vw, 1.05rem);
}
p,
li {
  font-weight: 300;
}

/* Sections */
section {
  margin-bottom: 5px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: clamp(10px, 2vw, 20px);
  background-color: var(--secondary-color);
}

/* Themes */
#mobile-theme-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40%;
  min-width: 136px;
  max-width: 200px;
  height: auto;
  margin-left: auto;
  border: 2px solid var(--border-color);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  padding: 12px 0;
  background-color: var(--secondary-color);
  box-shadow: 0 2px 5px var(--shadow);
}
#desktop-theme-bar {
  display: none;
}
.themes {
  border-radius: 50%;
  background-color: #ccc;
  cursor: pointer;
}

/* Intro section */
#hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: center;
  margin-top: 10px;
}
#hero * {
  padding: 2px 0;
}
#intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#intro h2 {
  font-weight: 400;
  font-size: clamp(1rem, 3vw, 1.1rem);
}
#intro p,
#social-links a {
  font-size: clamp(0.9rem, 2vw, 16px);
}
#intro #name,
#intro #emoji {
  font-size: clamp(1.1rem, 3vw, 1.2rem);
  font-weight: 700;
}
#status {
  position: relative;
  aspect-ratio: 1 / 1;
  width: clamp(100px, 30vw, 200px);
  margin: 0 auto;
  padding-left: 5%;
}
#profile-image {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
  border: 3px solid var(--themes);
  border-radius: 50%;
}
#online {
  position: absolute;
  bottom: 10%;
  right: 10%;
  aspect-ratio: 1 / 1;
  width: 12%;
  border: 3px solid var(--border-color);
  border-radius: 50%;
  background-color: var(--online-status);
  box-shadow: 0 0 0 rgba(49, 162, 76, 0.7);
  animation: pulse 1s infinite;
}

/* About me */
#about * {
  text-align: left;
}

/* Skills */
#skills ul {
  list-style-position: outside;
  padding-left: 20px;
}
#skills ul li {
  margin-bottom: 10px;
}
#skills ul li span {
  font-weight: 700;
}

/* Works section */
#works {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 5px;
  border: 0;
  padding: 0;
  background-color: transparent;
}
.my-works {
  aspect-ratio: 4 / 3;
  width: 100%;
  height: 100%;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--secondary-color);
}
.my-works h2 {
  padding: clamp(10px, 2vw, 20px);
}

/* Contacts section */
#contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
#contact i {
  margin-right: 10px;
}
#social-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}
#social-links a {
  font-size: 1rem;
}
#social-links a i {
  font-size: 1.2rem;
}

/* Download resume */
#download {
  width: 50%;
  margin: 0 auto;
  margin-bottom: 20px;
}
#download-resume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  text-decoration: none;
}
#download-icon {
  color: var(--text-color1);
}

/* Back-to-top */
#back-to-top {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}
#back-to-top.show {
  opacity: 1;
  visibility: visible;
}
#arrow-circle {
  border-radius: 50%;
  font-size: clamp(2.8rem, 5vw, 3rem);
  color: var(--text-color2);
  background-color: var(--primary-color);
  opacity: 0.75;
}
#arrow-circle:hover {
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

/* Animations */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(49, 162, 76, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(49, 162, 76, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(49, 162, 76, 0);
  }
}

/* Responsiveness */
@media (min-width: 768px) {
  section {
    margin-bottom: 0;
  }

  #hero,
  #download {
    margin: 0;
  }

  #hero {
    grid-area: hero;
  }

  #themes-about {
    grid-area: themes-about;
  }

  #skills {
    grid-area: skills;
  }

  #works {
    grid-area: works;
    gap: 12px;
    margin-bottom: 20px;
  }

  #contact-download {
    grid-area: contact-download;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  #download {
    width: 100%;
  }

  #grid-layout {
    display: grid;
    grid-template-areas:
      "hero hero hero hero hero"
      "themes-about themes-about skills skills contact-download"
      "works works works works contact-download";
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 12px;
    height: 100vh;
    height: 100dvh;
    padding: 20px;
  }
}

@media (min-width: 1024px) {
  body {
    padding: 0;
  }

  #grid-layout {
    grid-template-areas:
      "hero hero hero themes-about"
      "skills works works themes-about"
      "skills works works contact-download";
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }

  #themes-about {
    display: grid;
    grid-template-rows: 11% auto;
    gap: 12px;
  }

  #desktop-theme-bar {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #works {
    margin-bottom: 0;
  }
  .my-works {
    aspect-ratio: 0;
  }

  #back-to-top,
  #mobile-theme-bar {
    display: none;
  }
}

@media (min-width: 1280px) {
}
